var initialOptions = { count: 22, count1: 10, lists: {rows:[],total:0}, data: {}};
function product(state = initialOptions, action) {
  //2.创建数据中心
  switch (action.type) {
    case "INCREASE": 
      return { ...state, count: state.count + action.payload };
    case "DECREASE": 
      return { ...state, count1: state.count1 - action.payload };
    case "GETLIST": 
      return { ...state, lists: action.payload };
    case "GETDATA": 
      return { ...state, data: action.payload };

    default: 
      return state;
  }
}

export default product;
